package swt;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

public class SWTInheritanceExample extends Shell{
	
	
	public SWTInheritanceExample(Display display) {
		super(display);
		Label label = new Label(this, SWT.BORDER);
		label.setText("my Label");
	}

	public static void main(String[] args) {
		Display display = new Display();
		Shell shell = new SWTInheritanceExample(display);
		shell.open();
		while (!shell.isDisposed()) {
			if (!display.readAndDispatch())
				display.sleep();
		}
		display.dispose();
	}

}

